#ifndef TCPSERVER_H
#define TCPSERVER_H
#include <QtNetwork>
#include<QLabel>
#include <QMainWindow>

namespace Ui {
class Tcpserver;
}

class Tcpserver : public QMainWindow
{
    Q_OBJECT

public:
    explicit Tcpserver(QWidget *parent = nullptr);
    ~Tcpserver();
    QString getLocalIP();
    QTcpServer *tcpServer;
    QTcpSocket *tcpSocket = nullptr;
    void do_connect();
private slots:
    void do_newConnection();
    void do_clientConnected();
    void do_clientDisconnected();
    void do_socketReadyRead();
    void on_pushButton_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_2_clicked();
signals:
    void success();
private:
    Ui::Tcpserver *ui;
};

#endif // TCPSERVER_H
